<?php

class PageFace extends FaceBase {

	private $nohf = array();
	/**
	 * 构造函数，初始化插件
	 */
	public function __construct() {
		parent::__construct();

		if(!in_array(N_ACTION,$this->nohf)){
			n_mod('skin')->header();
		}
	}

	public function slide() {
		$param = $this->param('sid:char:ignore');
		if (isset($param['sid']))
			$sid = $param['sid'];
		else
			$sid = 1;

		$data['page'] = n_api('page')->getSlideById($sid);
		$data['hot_articles'] = n_api('article')->getHotArticleAll(5);
		$this->_html('slideIndex', $data);
	}

	public function __destruct(){
		if(!in_array(N_ACTION,$this->nohf)){
			n_mod('skin')->footer();
		}
	}
}